const container = document.querySelector('.starry-night');  
const starCount = 400; // 星星的数量  
  
function createStar() {  
    const star = document.createElement('div');  
    star.classList.add('star');  
    star.style.left = `${Math.random() * 100}%`;  
    star.style.top = `${Math.random() * 100}%`;    
    container.appendChild(star);  
}  
  
for (let i = 0; i < starCount; i++) {  
    createStar();  
}